package com.czkevin.cif.events;

import com.czkevin.cif.crafting.RecipeMatch;
import org.bukkit.entity.HumanEntity;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

public class CIFCraftingPickupEvent extends Event implements Cancellable {
  private static final HandlerList handlerList = new HandlerList();

  public final HumanEntity player;

  private final RecipeMatch matchedRecipe;

  private boolean cancelled = false;

  public CIFCraftingPickupEvent(HumanEntity player, RecipeMatch matchedRecipe) {
    this.player = player;
    this.matchedRecipe = matchedRecipe;
  }

  public RecipeMatch getMatchedRecipe() {
    return matchedRecipe;
  }

  @Override
  public void setCancelled(boolean cancelled) {
    this.cancelled = cancelled;
  }

  @Override
  public boolean isCancelled() {
    return cancelled;
  }


  @Override
  public HandlerList getHandlers() {
    return handlerList;
  }

  public static HandlerList getHandlerList() {
    return handlerList;
  }
}
